<%--
  Created by IntelliJ IDEA.
  User: S
  Date: 2021/10/11
  Time: 0:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%--${pageContext.request.contextPath}就是/项目即 /SSM_Demo1 路径；--%>
    <%--加了base后面的路径就相当于在项目的根目录下访问。--%>
    <base href="${pageContext.request.contextPath}/"/>
    <title>Title</title>
</head>
<body>
<h3>登录页面</h3>
<%--对应UserController.login()的request.setAttribute("tips", "用户名或者密码错误！");。--%>
${tips}
<%--参数名和UserController中的一致，则不用加@RequestParam--%>
<%--/user/login相当于上一级的上一级路径--%>
<form action="user/login" method="post">
    <p>账号：<input type="text" name="userName"></p>
    <p>密码：<input type="password" name="userPassword"></p>
    <p><input type="submit" value="登录"></p>
</form>
</body>
</html>
